Attribute VB_Name = "Drawer"
Option Explicit

Public Const BORDER_COLOR As Long = &HA87A56
Public Const SPLIT_COLOR  As Long = &H99A8AC


Public px As Single
Public py As Single

Public Sub InitDrawer()
    px = Screen.TwipsPerPixelX
    py = Screen.TwipsPerPixelY
End Sub
    
Public Sub DrawBorderBottom(p As PictureBox)
    p.Line (0, p.ScaleHeight - py)-(p.ScaleWidth, p.ScaleHeight - py), BORDER_COLOR
End Sub

Public Sub DrawBorderTop(p As PictureBox)
    p.Line (0, 0)-(p.ScaleWidth, 0), BORDER_COLOR
End Sub

Public Sub DrawBorderLeft(p As PictureBox)

End Sub

Public Sub DrawBorderRight(p As PictureBox)

End Sub

Public Sub DrawBorderSide(p As PictureBox)
    p.Line (0, 0)-(0, p.ScaleHeight), BORDER_COLOR
    p.Line (p.ScaleWidth - px, 0)-(p.ScaleWidth - px, p.ScaleHeight), BORDER_COLOR
End Sub

Public Sub DrawBorder(p As PictureBox, Optional Clear As Boolean = False)
    If Clear Then p.Cls
    p.Line (0, 0)-(p.ScaleWidth - px, p.ScaleHeight - py), BORDER_COLOR, B
End Sub

Public Sub DrawBackgroundPicture(p As PictureBox, pic As IPictureDisp)
    p.PaintPicture pic, 0, 0, p.ScaleWidth, p.ScaleHeight
End Sub
